package com.jinxiangyang.controller;

import com.jinxiangyang.annotation.OperateLog;
import com.jinxiangyang.domain.Git;
import com.jinxiangyang.utils.GitUtils;
import com.jinxiangyang.utils.enums.BusinessType;
import com.jinxiangyang.utils.enums.OperatorType;
import com.jinxiangyang.utils.result.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author jinxiangyang
 * @date 2023/8/19 10:33
 * @description TODO
 **/



@RestController
@Api(tags = "git提交信息接口")
public class GitController {



    @ApiOperation(value = "获取git提交信息")
    @GetMapping("/git")
    @OperateLog(title = "监控模块",businessType = BusinessType.OTHER,operatorType = OperatorType.ADMIN)
    public AjaxResult getGitInformation(){
        List<Git> gitInformation = GitUtils.getGitInformation();
        return AjaxResult.success(gitInformation);
    }





}
